<docs>
  ## 存档信息查询
</docs>
<template>
  <div>
    <mheader type="index" @back_btn="goBack()" title="存档信息查询"></mheader>
    <div class="list">
      <div class="title">存档信息</div>
      <div class="con_tent1" v-if="successflag">
        <ul>
          <li>
            档案所在机构：
            <span class="daszjg">
              {{cdxx.cdszjg}} &nbsp;
              <span class="jgml" @click="_table">机构名录</span>
            </span>
          </li>
          <li>
            存档日期：
            <span>{{cdxx.cdrq}}</span>
          </li>
          <li>
            是否欠费：
            <span>{{cdxx.sfqf}}</span>
          </li>
          <li>
            存档形式：
            <span>{{cdxx.cdxs == '' || cdxx.cdxs == null ? '个人存档' : cdxx.cdxs}}</span>
          </li>
        </ul>
      </div>
      <div class="con_tent2" v-if="outflag">
        <div class="title">您的档案已转出</div>
        <p>{{zcxx.zcnr}}</p>
        <p>{{zcxx.zcqx}}</p>
      </div>
      <div class="con_tent3" v-if="nodataflag">
        <div class="title">抱歉，未查到您的存档信息！</div>
      </div>
      <p class="_tip">
        友情提示：本功能仅限查询市人才档案公共管理服务中心和各区人力社保局所属流动人员人事档案管理服务机构的存档信息。查询结果仅供参考，如有异议可到相关存档机构进行核实，查询结果数据截止
        <span>{{time}}</span>。系统试运行期间，暂时无法查询原西城区人才服务中心、房山区人才服务中心存档信息。
      </p>
    </div>
  </div>
</template>
<script>
import Mheader from "@/ldry/group/mheader/mheader";
import $ from "common/js/axios";

export default {
  components: {
    Mheader
  },
  name: "reverseOne",
  data() {
    return {
      successflag: false,
      outflag: false,
      nodataflag: false,
      time: "",
      cdxx: {},
      zcxx: {
        zcnr: "",
        zcqx: ""
      }
    };
  },
  methods: {
    goBack() {
      this.$router.go(-1);
    },
    // 查询
    GET_jygzCx() {
      this.$loading = true;
      $.get("/dafwgl/cdxxCx").then(res => {
        this.time = res.returnData.jzrq;
        this.$loading = false;
        if (res.returnData.executeResult == 1) {
          var data = res.returnData;
          this.cdxx = data.cdxx == undefined ? {} : data.cdxx;
          this.zcxx = data.zcxx == undefined ? {} : data.zcxx;
          if (data.cdzt == 1) {
            this.successflag = true;
          } else if (data.cdzt == 2) {
            this.outflag = true;
          }
        } else if (res.returnData.executeResult == 0) {
          this.nodataflag = true;
        }
      });
    },
    _table(){
      this.$router.push({name:"jgTable"})
    }
  },
  created() {
    this.GET_jygzCx();
  }
};
</script>
<style lang="scss" scoped>
@import "~common/scss/variable.scss";
 // 申请须知
.list {
  // margin-top: $margin-base;
  padding: $padding-base;
  font-size: $font-size-base;
  border: $border;
  background-color: #fff;
  .title {
    font-size: 0.44444rem;
    color: #333;
    -webkit-box-flex: 1;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    line-height: 0.74074rem;
  }
  .con_tent1 ul {
    padding: $padding-base;
    li {
      line-height: 1.6;
    }
    li > span {
      display: inline-table;
      width: 60%;
      color: #111;
    }
    li:first-child {
      .daszjg {
        width: 50%;
      }
      .jgml {
        text-decoration: underline;
        color: $color-base;
      }
    }
  }
  .con_tent2 {
    padding: $padding-base;
    text-align: center;
    .title {
      font-weight: 800;
    }
  }
  .con_tent3 {
    .title {
      margin: 50px auto;
      text-align: center;
      font-weight: 800;
      font-size: 50px;
    }
  }
}
</style>
